//
// Created by zhuyijun on 2021/8/23.
//

#ifndef BASE_QUEUE_H
#define BASE_QUEUE_H

class Customer {
private:
    long arrive;
    int processTime;
public:
    Customer() : arrive(0), processTime(0) {}

    void set(long when);

    long when() const {
        return arrive;
    }

    int ptime() const {
        return processTime;
    }
};

typedef Customer Item;

//template<Class T>
class Queue {
private:
    struct Node {
        Item item;
        struct Node *next;
    };
    enum {
        Q_SIZE = 0
    };
    Node *front;
    Node *rear;
    int items;
    const int qsize;

    Queue(const Queue &q) : qsize(0) {}

    Queue &operator=(const Queue &q) {
        return *this;
    }

public:
    Queue(int qs = Q_SIZE);

    ~Queue();

    bool isEmpty() const;

    bool isFull() const;

    int queueCount() const;

    bool enqueue(const Item &item);

    bool deQueue(Item &item);
};


#endif //BASE_QUEUE_H
